Skip to content

fix(indexer): retry a message when a configured verifier did not start - #1634

Open
carte7000 wants to merge 2 commits into
feat/indexer/replica/devenvfrom
feat/indexer/replica/unavailable-verifier
Open

carte7000 wants to merge 2 commits into
feat/indexer/replica/devenvfrom
feat/indexer/replica/unavailable-verifier

Conversation

@carte7000

Copy link
Copy Markdown
Contributor

When the reader of a configured verifier fails at startup, the task treated its address as unknown and ignored it. The message could then become SUCCESS without the verifications of that verifier.

Mark the issuer addresses of a skipped verifier as unavailable in the verifier registry. The task counts them as unavailable CCVs, so the message retries until the deadline. With more than one replica, a replica with a failed reader no longer settles the message too early.

An address that is in no verifier config is still unknown, as before.

@carte7000
carte7000 added this pull request to stack #1633 November 23, 2026 19:16
@carte7000
carte7000 marked this pull request as ready for review November 23, 2026 19:46
@carte7000
carte7000 requested review from a team as code owners November 23, 2026 19:46
When the reader of a configured verifier fails at startup, the task
treated its address as unknown and ignored it. The message could then
become SUCCESS without the verifications of that verifier.

Mark the issuer addresses of a skipped verifier as unavailable in the
verifier registry. The task counts them as unavailable CCVs, so the
message retries until the deadline. With more than one replica, a
replica with a failed reader no longer settles the message too early.

An address that is in no verifier config is still unknown, as before.
@carte7000
carte7000 force-pushed the feat/indexer/replica/unavailable-verifier branch from 7d702a9 to 7e76d02 Compare November 23, 2026 20:00
tt-cll
tt-cll previously approved these changes Nov 23, 2026
### Unavailable CCVs include unstarted verifiers

- `Task.loadVerifierReaders` returns a fourth list: the addresses that are configured but have no started reader.
- `Execute` adds these addresses to `TaskResult.UnavailableCCVs`. The worker retries a message while `UnavailableCCVs > 0`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what situation would we have a case of unavailable CCVs in practice? Seems like it would be very rare? Looking at the bootup toml code unknown Type is already rejected. deduplication is also done so there won't be duplicates. so most likely the error will be due to invalid Issuer address if they are hand-typed in the config. But even that comes from datastore

I generally agree that marking UNAVAILABLE is better than not even registering. But doesn't this open a silent delay in messages if there is a misconfigured verifier config. Because all messages will continue to retry until timeout because the verifier is unavailable. Would be nicer if this is caught before boot (like reject the toml invalid error)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that's a good callout, we should catch as much as we can early in the config validation and only have unavailable in exceptional case. We should be loud about it if it ever happen so will add the metric there as well

"missing", len(missing),
"attempting", len(attemptingToRetrieve),
"unknown", len(unknownCCVs),
"unstarted", len(unstarted),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some metric/alerting would be nice so that we know if/when and how many messages are blocked due to unstarted verifier

@github-actions

Copy link
Copy Markdown
Contributor

Code coverage report:

Package main feat/indexer/replica/unavailable-verifier Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 46.21% 46.21% +0.00%
github.com/smartcontractkit/chainlink-ccv/bootstrap 67.91% 67.91% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 53.78% 53.78% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 52.74% 52.74% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 47.59% 47.59% +0.00%
github.com/smartcontractkit/chainlink-ccv/docs 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 44.92% 44.92% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 35.79% 36.33% +0.54%
github.com/smartcontractkit/chainlink-ccv/integration 70.90% 70.90% +0.00%
github.com/smartcontractkit/chainlink-ccv/internal 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/migration 78.70% 78.70% +0.00%
github.com/smartcontractkit/chainlink-ccv/pkg 84.62% 84.62% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 18.67% 18.67% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 61.72% 61.72% +0.00%
github.com/smartcontractkit/chainlink-ccv/tools 53.56% 53.56% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 45.22% 45.22% +0.00%
Total 48.90% 48.90% +0.00%

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants